DEFINE BUFFER p FOR ptp_det.
DEFINE BUFFER s FOR ptp_det.    

FOR EACH pt_mstr WHERE  pt_status = "AC":

    FIND FIRST p WHERE p.ptp__chr01 = "C" AND INDEX ("500,510,220", p.ptp_site) > 0 AND pt_part = p.ptp_part NO-LOCK NO-ERROR.
    IF NOT (AVAILABLE p) THEN
      DISP pt_part pt_pm_code pt_desc1 pt_group.
/*     FIND FIRST s WHERE s.ptp_part = p.ptp_part AND s.ptp__chr01 = "C" AND s.ptp_site <> p.ptp_site NO-LOCK NO-ERROR. */
/*     IF NOT (AVAILABLE s) THEN                                                                                        */
/*                                                                                                                      */
/*     DISP p.ptp_part p.ptp_site p.ptp_pm_code p.ptp__chr01                                                            */
/*          s.ptp__chr01 WHEN (AVAILABLE s) LABEL "Cst"                                                                 */
/*          s.ptp_site WHEN (AVAILABLE s)                                                                               */
/*     WITH STREAM-IO.                                                                                                  */

END.
